package com.example.orderserver.dao;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface OrderItemDao {

    @Insert("insert into order_item (id, goods_id, order_id, quantity, price) values" +
            " (#{id}, #{goodsId}, #{orderId}, #{quantity}, #{price})")
    void insertOrderItem(@Param("id") Long id, @Param("goodsId") Long goodsId, @Param("orderId") Long orderId,
                         @Param("quantity") Integer quantity, @Param("price") Integer price);
}
